package Cale;

public class Test {
    public static void main(String[] args) {
    Cale cl = new Cale(8,0);
cl.AND();
cl.DIFFER();
cl.MULTIPLE();
cl.DIVISION();
    }
}

//类名Cale
//定义两个变量
//定义四个方法实现求和、差、乘、商（除数为0则提示）
class Cale {
    int a ,b;
    public Cale(int a, int b){
        this.a = a;
        this.b = b;
    }

    public void AND(){
        System.out.println(a+"和"+b+"的和为"+(a+b));
    }
    public void DIFFER(){
        System.out.println(a+"和"+b+"的差为"+(a-b));
    }
    public void MULTIPLE(){
        System.out.println(a+"和"+b+"的积为"+(a*b));
    }
    public void DIVISION(){
        if(b == 0)
            System.out.println("被除数为0！");
        else
            System.out.println(a+"除以"+b+"的商为"+((double)a/b));

    }
}